<template>
  <van-field label="验证码" v-model="code" placeholder="请输入验证码">
    <!-- 通过 button 插槽可以在输入框尾部插入按钮 -->
    <template #button>
      <!-- 这里有bug，使用<van-button>无法进行局部表单验证 -->
      <!-- <van-button size="small" type="primary" @click="getCode">发送验证码</van-button> -->
      <div class="button" @click="getCode">发送验证码</div>
    </template>
  </van-field>

</template>

<script>
export default {
  name: "phone_verification"
}
</script>

<style scoped>

</style>